package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TransprotServiceMapper;
import com.ruoyi.system.domain.TransprotService;
import com.ruoyi.system.service.ITransprotServiceService;

/**
 * 物件Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-06-17
 */
@Service
public class TransprotServiceServiceImpl implements ITransprotServiceService 
{
    @Autowired
    private TransprotServiceMapper transprotServiceMapper;

    /**
     * 查询物件搬运
     * 
     * @param traId 物件搬运ID
     * @return 物件搬运
     */
    @Override
    public TransprotService selectTransprotServiceById(Long traId)
    {
        return transprotServiceMapper.selectTransprotServiceById(traId);
    }

    /**
     * 查询物件搬运列表
     * 
     * @param transprotService 物件搬运
     * @return 物件搬运
     */
    @Override
    public List<TransprotService> selectTransprotServiceList(TransprotService transprotService)
    {
        return transprotServiceMapper.selectTransprotServiceList(transprotService);
    }

    /**
     * 新增物件搬运
     * 
     * @param transprotService 物件搬运
     * @return 结果
     */
    @Override
    public int insertTransprotService(TransprotService transprotService)
    {
        transprotService.setTraCreatetime(DateUtils.getNowDate());
        return transprotServiceMapper.insertTransprotService(transprotService);
    }

    /**
     * 修改物件搬运
     * 
     * @param transprotService 物件搬运
     * @return 结果
     */
    @Override
    public int updateTransprotService(TransprotService transprotService)
    {   transprotService.setUpdateTime(DateUtils.getNowDate());
        return transprotServiceMapper.updateTransprotService(transprotService);
    }

    /**
     * 批量删除物件搬运
     * 
     * @param traIds 需要删除的物件搬运ID
     * @return 结果
     */
    @Override
    public int deleteTransprotServiceByIds(Long[] traIds)
    {
        return transprotServiceMapper.deleteTransprotServiceByIds(traIds);
    }

    /**
     * 删除物件搬运信息
     * 
     * @param traId 物件搬运ID
     * @return 结果
     */
    @Override
    public int deleteTransprotServiceById(Long traId)
    {
        return transprotServiceMapper.deleteTransprotServiceById(traId);
    }
}
